//---------------------------------------------------------------------
//  This file is part of the Microsoft .NET Framework SDK Code Samples.
// 
//  Copyright (C) Microsoft Corporation.  All rights reserved.
// 
//This source code is intended only as a supplement to Microsoft
//Development Tools and/or on-line documentation.  See these other
//materials for detailed information regarding Microsoft code samples.
// 
//THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
//KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//PARTICULAR PURPOSE.
//---------------------------------------------------------------------

using System;
using System.Collections;
using System.Resources;

namespace TaskVision
{
	public enum TaskFilterValue
	{
		AllTasks = 0,
		OpenTasks = 1,
		MyTasks = 2
	}

	public class TaskFilter
	{
		private TaskFilterValue m_FilterValue;
		private string m_DisplayText;

		public static ArrayList GetValues()
		{
			ResourceManager m_ResourceManager = 
				new ResourceManager("TaskVision.Localize", System.Reflection.Assembly.GetExecutingAssembly());

			ArrayList retVal = new ArrayList();
			retVal.Add(new TaskFilter(m_ResourceManager.GetString("Filter_All"), TaskFilterValue.AllTasks));
			retVal.Add(new TaskFilter(m_ResourceManager.GetString("Filter_Open"), TaskFilterValue.OpenTasks));
			retVal.Add(new TaskFilter(m_ResourceManager.GetString("Filter_My"), TaskFilterValue.MyTasks));
			return retVal;
		}

		public TaskFilter(string displayText, TaskFilterValue filterValue)
		{
			m_DisplayText = displayText;
			m_FilterValue = filterValue;
		}

		public TaskFilterValue Value
		{
			get	{return m_FilterValue;}
			set	{m_FilterValue = value;}
		}
	
		public string Text
		{
			get	{return m_DisplayText;}
			set	{m_DisplayText = value;}
		}

	}
}
